package org.llc.gof.structure.proxy.cglib;

/**
 * @author harvey
 */
public class Client {

    public static void main(String[] args) {

        CglibProxy proxy = new CglibProxy();
        //动态生成子类的方法创建代理类
        SubjectImpl subject = (SubjectImpl) proxy.getProxy(SubjectImpl.class);
        BasicSubject basic = (BasicSubject) proxy.getProxy(BasicSubject.class);

        subject.doAnything("doAnything");
        subject.doSomething("doSomething");
        basic.doSomething("basic1 doSomething");

    }

}
